GtkIMContextSimple: Change guint to guint16 in gtkimcontextsimple.c
authorTakao Fujiwara <tfujiwar@redhat.com>
Thu, 3 Sep 2015 08:43:52 +0000 (17:43 +0900)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 9 Oct 2015 02:35:52 +0000 (22:35 -0400)
GtkComposeTable and GtkComposeTableCompact use guint16 for the data.

https://bugzilla.gnome.org/show_bug.cgi?id=721120

gtk/gtkimcontextsimple.c
gtk/gtkimcontextsimpleprivate.h

index d5d394b7449932d10b3e84a59e3d94326aec8851..a89146aa8ca15a8f36ff550eeb73cb6f73a31142 100644 (file)
@@ -42,7 +42,7 @@ struct _GtkIMContextSimplePrivate
 {
   GSList        *tables;
 
-  guint          compose_buffer[GTK_MAX_COMPOSE_LEN + 1];
+  guint16        compose_buffer[GTK_MAX_COMPOSE_LEN + 1];
   gunichar       tentative_match;
   gint           tentative_match_len;
 
@@ -163,7 +163,7 @@ gtk_im_context_simple_commit_char (GtkIMContext *context,
 static int
 compare_seq_index (const void *key, const void *value)
 {
-  const guint *keysyms = key;
+  const guint16 *keysyms = key;
   const guint16 *seq = value;
 
   if (keysyms[0] < seq[0])
@@ -178,7 +178,7 @@ static int
 compare_seq (const void *key, const void *value)
 {
   int i = 0;
-  const guint *keysyms = key;
+  const guint16 *keysyms = key;
   const guint16 *seq = value;
 
   while (keysyms[i])
@@ -394,7 +394,7 @@ check_quartz_special_cases (GtkIMContextSimple *context_simple,
 
 gboolean
 gtk_check_compact_table (const GtkComposeTableCompact  *table,
-                         guint                         *compose_buffer,
+                         guint16                       *compose_buffer,
                          gint                           n_compose,
                          gboolean                      *compose_finish,
                          gboolean                      *compose_match,
@@ -567,7 +567,7 @@ check_normalize_nfc (gunichar* combination_buffer, gint n_compose)
 }
 
 gboolean
-gtk_check_algorithmically (const guint         *compose_buffer,
+gtk_check_algorithmically (const guint16       *compose_buffer,
                            gint                 n_compose,
                            gunichar            *output_char)
 
index 7e59368f502b9649015a499263fd281e76e4f7b9..737f07a23334b79c2a42322e8751e364f12679f6 100644 (file)
@@ -33,11 +33,11 @@ G_BEGIN_DECLS
 
 extern const GtkComposeTableCompact gtk_compose_table_compact;
 
-gboolean gtk_check_algorithmically (const guint                  *compose_buffer,
+gboolean gtk_check_algorithmically (const guint16                *compose_buffer,
                                     gint                          n_compose,
                                     gunichar                     *output);
 gboolean gtk_check_compact_table   (const GtkComposeTableCompact *table,
-                                    guint                        *compose_buffer,
+                                    guint16                      *compose_buffer,
                                     gint                          n_compose,
                                     gboolean                     *compose_finish,
                                     gboolean                     *compose_match,